//
//  ICMProxyActivity.h
//  ICrEAM
//
//  Created by rainimute on 16/11/22.
//  Copyright © 2016年 mac. All rights reserved.
//

#import <UIKit/UIKit.h>
@class ICMProxyActivityModel;
@class ICMProxyActivityItemModel;
@class ICMProxyActivityViewModel;
#import "ICMCellPartView.h"
#import "ICMCellLabourView.h"
#import "ICMCellContentView.h"

@protocol ICMProxyActivityDelegate <NSObject>

@optional
- (void)haveChangeRepairTypes;

@end

@interface ICMProxyActivity : UIView

@property (nonatomic, weak) id<ICMProxyActivityDelegate>delegate;//代理
//选择的维修类型
@property (nonatomic, strong) NSMutableArray *repairTypes;

//选择的活动
@property (nonatomic ,strong) NSMutableArray *selectedActivitys;

@property (nonatomic, strong) NSMutableArray *activityModels;//活动model

@property (nonatomic, strong) UITableView *activityTableView;//活动tableview

//根据活动里面项目和零件  和   项目和零件  生成对应关系数据字典
@property (nonatomic, strong) NSMutableDictionary *labourAndPartsExistDic;

+ (instancetype)createSelecteActivityViewWithFrame:(CGRect)frame;

//初始化被选择的活动
- (void)resetSelectedActivity;

//界面值是否改变
@property (nonatomic, assign) BOOL hasViewValueChanged;

@end



@class ICMProxyActivityCell;
@protocol ICMProxyActivityCellDelegate <NSObject>

@optional
- (void)didSelectedCell:(ICMProxyActivityCell*)cell;
- (void)didSelectedCellRotateButton:(ICMProxyActivityCell*)cell;
- (void)didClickedCellItem:(ICMProxyActivityCell*)cell WithSelected:(BOOL)isSelected;

@end

@interface ICMProxyActivityCell : UITableViewCell

@property (nonatomic, weak) id<ICMProxyActivityCellDelegate>delegate;//代理

@property (nonatomic, strong) ICMProxyActivityViewModel *viewModel;//活动model

@property (nonatomic, strong) ICMCellPartView *partView;//零件view

@property (nonatomic, strong) ICMCellLabourView *labourView;//项目view

@property (nonatomic, strong) ICMCellContentView *subContentView;//子内容view

//根据活动里面项目和零件  和   项目和零件  生成对应关系数据字典
@property (nonatomic, strong) NSMutableDictionary *labourAndPartsExistDic;

- (void)setupSelecteActivityCellWithModel:(ICMProxyActivityViewModel*)model WithExistDic:(NSMutableDictionary *)dic;

@end
